<template>
  <view class="su-list-loading" v-if="loading">
    <template v-if="!listLength">
      <u-skeleton class="mb30" v-for="item in 5" :key="item" rows="3" :loading="true" :animate="true"></u-skeleton>
    </template>
    <u-loading-icon v-else mode="circle"></u-loading-icon>
  </view>
</template>

<script>
  export default {
    name: "su-list-loading",
    props: {
      loading: {
        type: Boolean,
        default: false
      },
      listLength: {
        type: Number,
        default: 0
      }
    }
  }
</script>

<style lang="scss">
  .su-list-loading {
    padding: 20upx;
  }
</style>
